<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$bar="Sum up CV Status:Name <strong>".$FullName. "</strong>  CV Name: <strong>".$CV_Name."</strong>";
        echo '<table id="box-table-a" cellspacing="1" align="right" width="900px">';
        echo '<tr><td colspan=10 align=right class=bar>'.$bar.'</td></tr>';
        //echo '<tr><td colspan=5 align=right class=pagination>'.$pagination.'</td></tr>';
        echo '
              <th>Round</th>
              <th>Interview Date</th>
              <th>Time</th>
              <th>Job Post</th>
              <th>Interviewer</th>
              <th>Result</th>
              <th>Update Date</th>
              <th>CV Status</th>
              <th>Action</th>
              ';
        foreach($query->result() as $row){
            //$images='<img src="'.base_url().'application/templates/images/'.$row->staff_avarta.'" width=100 height=70>';
            //$details = anchor("user/loadUpdateForm/$row->Staff_ID",$images);
            echo "<tr>
                        
                        <td class=\"row10\">$row->Round</td>
                        <td class=\"row12\">$row->TestDate</td>
                        <td class=\"row10\">$row->Hour</td>
                        <td class=\"row10\">$row->PositionInterview</td>
                        <td class=\"row12\">$row->Interviewer</td>
                        <td class=\"row10\">$row->Result</td>
                        <td class=\"row12\">$row->UpdateDate</td>
                        <td class=\"row10\">$row->CV_Status</td>
                        
                        ";
            $titleEditInterview = '<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to edit interview"/>';
            $IC_ID=$row->Interview_ID."-".$CV_ID;
            $edit = anchor("interview/loadFormEditInterview/$IC_ID",$titleEditInterview);
            echo "<td class=\"row12\" align=\"center\">$edit</td></tr>";
            /*$sql="select count(Result) as numberinterview from Interview where CV_ID=$row->CV_ID";
            $query1=$this->db->query($sql);
            foreach($query1->result() as $row1)
            {
                echo "<td class=\"row1\" align=\"center\">$row1->numberinterview</td>";
                if($row1->numberinterview<3)
                {
                    $titleChooseInterview = '<img src ="'.base_url().'templates/images/icons/select.jpeg" width=40 height=25 title="Click here to choose to interview"/>';
                    $choose = anchor("interview/loadFormInsertStaff",$titleChooseInterview);
                    echo "<td class=\"row1\" align=\"center\">$choose</td></tr>";
                }
                else
                {
                    $titleViewInterview = '<img src ="'.base_url().'templates/images/icons/view.gif" width=40 height=25 title="Click here to choose to interview"/>';
                    $view = anchor("interview/loadFormViewInterview/$row->CV_ID",$titleViewInterview);
                    echo "<td class=\"row1\" align=\"center\">$view</td></tr>";
                }
            }*/
            
            /*$titleUpdate = '<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>';
            $titleDelete = '<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete"/>';
            //$titleActive = '<img src ="'.base_url().'application/templates/images/icons/active.jpg" title="Click here to active"/>';
            $titleView = '<img src ="'.base_url().'templates/images/icons/view.gif" height=25 title="Click here to view "/>';
            $titleInsertFamily = '<img src ="'.base_url().'templates/images/icons/insert_family.jpeg" width=40 height=25 title="Click here to insert family"/>';
            $update = anchor("staff/loadStaffUpdateForm/$row->Staff_ID",$titleUpdate);
            $delete = anchor("staff/deleteStaff/$row->Staff_ID",$titleDelete);
            //$active = anchor("user/loadConfirmForm/$row->Staff_ID",$titleActive);
            $view_staff=anchor("staff/viewInformationStaff/$row->Staff_ID",$titleView);
            $insert_family=anchor("staff/loadFormInsertFamily/$row->Staff_ID",$titleInsertFamily);*/
            
            }
            $titleback = '<img src ="'.base_url().'templates/images/icons/back.jpg" width=40 height=25 title="Back"/>';
            $back = anchor("interview/loadListCV",$titleback);
            echo '<tr><td colspan=10 align=center>' .$back.'</td></tr>';
        echo '</table>';
?>
